From d5d091e99a21a8300fd7f08d891be24a24781779 Mon Sep 17 00:00:00 2001 From: robertl Date: Tue, 18 Jan 2005 19:15:32 +0000 Subject: [PATCH] Handle case when mkshort has NO valid name. --- mkshort.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mkshort.c b/mkshort.c index 19ec3a51e..5f40e1803 100644 --- a/mkshort.c +++ b/mkshort.c @@ -386,6 +386,14 @@ mkshort(void *h, const char *istring) strcpy(&ostring[hdl->target_len] - strlen(np), np); } + /* + * If, after all that, we have an empty string, punt and + * let the must_uniq code handle it. + */ + if (ostring[0] == '\0') { + ostring = xstrdup("WPT"); + } + if (hdl->must_uniq) { return mkshort_add_to_list(hdl, ostring); } -- 2.30.2